using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class webadmin_pages_cosodaotao_list : System.Web.UI.Page
{
    public Common _common;
    public DataTable catdtt;
    public DataTable catsubdtt;
    public DataTable newsddt = new DataTable();
    private void LoadCSDT()
    {
        string sql = "select *, convert(varchar, A.ngay_tao, 103) as ngaytao from DaoTao_co_so_dao_tao as A left join DaoTao_mo_hinh_dao_tao as B on A.ma_mo_hinh_dt = B.ma_mo_hinh_dt order by A.ngay_tao desc";
        DataSet set = this._common.ExeceuteDataset(sql);
        this.rpt_csdt.DataSource = set;
        this.rpt_csdt.DataBind();
        this.lbl_total.Text = set.Tables[0].Rows.Count.ToString();
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        this._common = new Common();
        if ((!string.IsNullOrEmpty(base.Request.Params["id"]) && !string.IsNullOrEmpty(base.Request.Params["act"])) && base.Request.Params["act"].ToString().Trim().Equals("del"))
        {
            string str = this._common.TextFormat(base.Request.Params["id"].ToString());
            this._common.execNoneQuery("delete DaoTao_khoa_dao_tao where ma_co_so_dt = '" + str + "'");
            this._common.execNoneQuery("delete DaoTao_co_so_dao_tao where ma_co_so_dt = '" + str + "'");
        }
        this.LoadCSDT();
    }
}
